using System;
using System.Windows;

namespace WaistGuard
{
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            AppDomain.CurrentDomain.UnhandledException += (sender, args) =>
            {
                MessageBox.Show($"发生未处理的异常：{args.ExceptionObject}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
            };
        }
    }
} 